package com.zgh.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("news")
public class News implements Serializable {
    private static final long serialVersionUID=6L;
    @TableId(value = "id",type = IdType.AUTO)
    private int id;
    private String title;
    private String content;
    private int views;
    @TableField("coverUrl")
    private String coverUrl;
    @TableField("userId")
    private int userId;
    @TableField("releaseTime")
    private String releaseTime;
    @TableField("provinceName")
    private String provinceName;
    @TableField(exist = false)
    private User user;
}
